home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MEMORY.SWG / 0044_Stack Use 2.pas < prev    next >
Pascal/Delphi Source File  |  1994-01-27  |  462b  |  16 lines

  1. {
  2. > Does anyone know if there is any way to check how much of the stack your
  3. > program is using at any given moment?  I have Turbo Debugger if that makes
  4. > a difference.
  5. }
  6.  
  7. Function Stackpos : word; assembler;
  8. asm
  9.   mov ax,sp
  10. end;
  11.  
  12. {
  13. This should give You a indication on how the stack is used - otherwise look
  14. at SP in the registers - It should start of at the size you stated for the
  15. program and shrink down to zero as your program crashes :-)
  16. }